<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateExamAppTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('exam_app', function (Blueprint $table) {
            $table->bigIncrements('id');
            // 状态
            $table->tinyInteger('status', false, true)->default(1)->comment('状态,1|正常、2|禁用');
            // 创建时间
            $table->dateTimeTz('created_at')->nullable()->comment('创建时间');
            // 更新时间
            $table->dateTimeTz('updated_at')->nullable()->comment('更新时间');
            // 删除时间
            $table->dateTimeTz('deleted_at')->nullable()->comment('删除时间');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('exam_app');
    }
}
